/*
 * @Author: huyuhang
 * @Data:
 * @LastEditors: huyuhang
 * @LastEditTime: 2024-01-26 16:50:35
 * @Description: �½�����Դ̽������ӿ�
 */
import request from '@/config/axios'

export const saveTask = async (data) => {
  return await request.postOriginal({ url: '/amp/asset-task/create-discover', data })
}

export const editTask = async (data) => {
  return await request.postOriginal({ url: '/amp/asset-task/update-discover', data })
}

export const getTaskDetail = async (params) => {
  return await request.get({ url: '/amp/asset-task/get-original', params })
}

// 查看结果
// 顶部信息
export const getBaseInfo = async (params) => {
  return await request.get({ url: '/amp/detection-results/header', params })
}

// 数据源列表
export const getList = async (params) => {
  return await request.getOriginal({ url: '/amp/asset-task/get-discover', params })
}

// 加入数据源
export const addDataSource = async (data) => {
  return await request.postOriginal({ url: '/amp/detection-results/add', data })
}

// 修改资产类型
export const updateAsset = async (data) => {
  return await request.post({ url: '/amp/detection-results/update', data })
}

//删除数据源探测结果列表
export const delResultItem = async (data) => {
  return await request.postOriginal({ url: '/amp/detection-results/delete', data })
}
